package com.fs.base.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import com.fs.base.param.SysConstant;

@Entity
@Table(name="s_log")
@Data@EqualsAndHashCode(callSuper=false)
@NoArgsConstructor
public class Log extends PkEntity{
	private String logUrl;
	@Column(columnDefinition="text COMMENT '备注'")
	private String logData;
	private String logIp;
	private String logMethod;
	
	@Transient
	//@Formula("( select u.account from s_user u where  u.id in (creater_id) limit 1 )")
	private String userName;

	public String getUserName() {
		return SysConstant.USERS_ID_NAME_MAP.get(createrId);
	}
	
}
